package com.ygx.zxing.model

import com.lv.common.base.BaseViewModel

/**
 * 作者： ygx
 * 创建日期：2022/1/8 2:32 PM
 * 签名： 天行健，君子以自强不息；地势坤，君子以厚德载物。
 *      _              _           _     _   ____  _             _ _
 *     / \   _ __   __| |_ __ ___ (_) __| | / ___|| |_ _   _  __| (_) ___
 *    / _ \ | '_ \ / _` | '__/ _ \| |/ _` | \___ \| __| | | |/ _` | |/ _ \
 *   / ___ \| | | | (_| | | | (_) | | (_| |  ___) | |_| |_| | (_| | | (_) |
 *  /_/   \_\_| |_|\__,_|_|  \___/|_|\__,_| |____/ \__|\__,_|\__,_|_|\___/
 *
 * You never know what you can do until you try !
 * ----------------------------------------------------------------
 *
 */
class ZxingViewModule(private val resource: IZxingResource) : BaseViewModel() {
//    val circleLiveData: LiveData<BaseYgxRsp> = resource.

//    fun findCircleList(name: String?, page: Int, pageSize: Int, refresh: SmartRefreshLayout) =
//        serverAwait {
//            resource.findCircleList(name, page, pageSize, refresh)
//        }
    /**
     * 获取货圈数据
     */
    suspend fun findCircleData(
        name: String?,
        page: Int,
        pageSize: Int,
    ) = resource.findCircleList(name, page, pageSize)

    /**
     * 获取资讯数据
     */
    suspend fun findMaterialInformation(
        code: String?,
        page: Int,
        pageSize: Int,
    ) = resource.findMaterialInformation(code, page, pageSize)


}